package com.hxx.h.note

import android.graphics.Color
import android.os.Bundle
import android.text.SpannableStringBuilder
import android.text.Spanned
import android.text.style.ForegroundColorSpan
import android.text.style.UnderlineSpan
import android.util.Log
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.hxx.h.R
import kotlinx.android.synthetic.main.activity_new.*

class NewActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_new)
        input.append("12345")
        input.bindMenu(menu)
        undo.setOnClickListener {
            if (input.canUndo()){
                input.undo()
            }
        }
        redo.setOnClickListener {
            if (input.canRedo()){
                input.redo()
            }
        }
    }
}